<?php

$root = dirname(__FILE__);
define('BASEPATH', $root.'/');
require_once $root.'/function.php';
require_once $root.'/config.php';
require_once $root.'/model.php';


$model = new Model();

//獲取中轉站的server信息
$baseServer = $model->getBaseServer();
initBaseServerInfo($baseServer);

$serverList = $model->getStorageServerList();
foreach($serverList as $storageServer){
  $return = getDiskUseSize();
  if( !$return){
     continue;
  }
  $return['id'] = $storageServer['id'];
//var_dump($return);exit;
  $model->setStorageServerUse($return);
  sleep(1);
}

echo "\n =========== 計算磁盤空間使用情況結束! =============== \n";
